package io.renren.controller;

import io.renren.entity.EboardStatistic;
import io.renren.service.EboardStatisticService;
import io.renren.service.SysUserRoleService;
import io.renren.util.BootstrapPageBean;
import io.renren.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 班牌统计
 * Created by 94504 on 2017/7/20.
 */
@Controller
@RequestMapping("/eboardStatistic")
public class EboardStatisticController
{
    @Autowired
    private EboardStatisticService statisticService;
    @Autowired
    private SysUserRoleService userRoleService;


    @RequestMapping("/test")
    @ResponseBody
    public BootstrapPageBean test(BootstrapPageBean pageBean, EboardStatistic eboardStatistic)
    {
        pageBean = statisticService.pageStuCardRecord(pageBean, "yyyy-MM-dd", eboardStatistic
                , userRoleService.queryRoleIdList(ShiroUtils.getUserEntity().getUserId()).get(0));

        return pageBean;
    }

}
